package com.yuandian.management.enums;
/**
 * 操作类型枚举
 * @author User
 *
 */
public enum OperTypeEnum {
	/**
	 * 更新xml文件
	 */
	UPDATE_XML_FILE("0","100"),
	/**
	 * 获取探针状态信息
	 */
	GET_PROBE_STATUS("1","200"),
	/**
	 * 探针抓包过滤子模块
	 */
	FILTER_CHILD_MODULE("2","300"),
	/**
	 * 探针kafka同步子模块
	 */
	OperTypeEnum400("3","400"),
	/**
	 * 控制探针失活/激活
	 */
	OperTypeEnum500("4","500"),
	/**
	 * 查询探针状态
	 */
	OperTypeEnum600("5","600"),
	/**
	 * 查询探针接口信息
	 */
	OperTypeEnum700("6","700"),
	/**
	 * 获取探针配置信息
	 */
	GET_PROBE_CONFIG("7","800");
	
	private String code;
	private String message;
	
	private OperTypeEnum(String code, String message){
		this.code=code;
		this.message=message;
	}

	public static String getOperTypeEnumValue(String key){
		for (OperTypeEnum operTypeEnum : OperTypeEnum.values()) {
			if(operTypeEnum.getCode().equals(key.trim())){
				return operTypeEnum.getMessage();
			}
		}
		throw new IllegalArgumentException("Invalid enum Code: " + key);
	}
	
	public String getCode() {
		return code;
	}

	public String getMessage() {
		return message;
	}

	@Override
	public String toString(){
		return this.code+"_"+this.message;
	}
}
